<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>




<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <%@ include file="static_res.jsp"%>
    <!-- 引入ckeditor.js和ckfinder.js -->
    <script type="text/javascript" src="<%=path%>/plugins/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="<%=path%>/plugins/ckfinder/ckfinder.js"></script>

    <title>ckeditor</title>
</head>
<body>
<%@ include file="header.jsp"%>
<div class="container">
    <form action="<%=path%>/article/writeArticle" method="post">
        <div class="input-field row">
            <input id="title" name="title" type="text" class="validate">
            <label for="title">文章标题</label>
        </div>
        <textarea class="materialize-textarea" name="editor1" id="editor1" rows="15" cols="80">
                    This is my textarea to be replaced with CKEditor.
        </textarea>

        <div class="center-align">
            <button class="btn waves-effect waves-teal" type="submit" name="action">提交</button>
        </div>

    </form>
</div>
<!-- 将id为editor1的textarea用ckeditor来操作 -->
<script type="text/javascript">
    var editor = CKEDITOR.replace( 'editor1' );
    CKFinder.setupCKEditor(editor, '<%=path%>/plugins/ckfinder/');
</script>
</body>
</html>